/**
 * Main.jsp专用 AUTHOR: BRYAN 02/12/2011
 */

function openDialog(h, w, t, url) {
	$("#dialog-modal").dialog({
		autoOpen : false,
		height : h,
		width : w,
		title : t,
		resizable : false,
		modal : true,
		close : function(e, ui) {
			$(this).find("#fraDialog").attr("src", "");
		},
		open : function(e, ui) {
			var src = url.split("#")[0];
			src += (src.indexOf("?", 0) > 0 ? "&" : "?"); // + "timeStamp=" +
															// e.timeStamp;
			$(this).find("#fraDialog").attr("src", src);
		}
	});

	$('#dialog-modal').dialog('open');
}

function closeDialog() {
	$('#dialog-modal').dialog('close');
}

function openDialog2(h, w, t, url) {
	$("#dialog-modal2").dialog({
		autoOpen : false,
		height : h,
		width : w,
		resizable : false,
		title : t,
		modal : true,
		close : function(e, ui) {
			$(this).find("#fraDialog2").attr("src", "");
		},
		open : function(e, ui) {
			var src = url.split("#")[0];
			src += (src.indexOf("?", 0) > 0 ? "&" : "?"); // + "timeStamp=" +
															// e.timeStamp;
			$(this).find("#fraDialog2").attr("src", url);
		}
	});

	$('#dialog-modal2').dialog('open');
}

function closeDialog2() {
	$('#dialog-modal2').dialog('close');
}

function openAlert(msg) {
	document.getElementById('msgContent').innerHTML = msg;

	$("#dialog-message").dialog({
		modal : true,
		buttons : {
			" 关闭 " : function() {
				$(this).dialog("close");
			}
		}
	});
}

function changeMenu(as_URL) {
	document.getElementById("fraMain").src = as_URL;
}